package com.tgu.home_action.service;

import com.tgu.home_action.pojo.ResponseData;
import com.tgu.home_action.pojo.Volunteer;
import com.tgu.home_action.pojo.VolunteerInformation;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.List;

public interface VolunteerInformationService {
    ResponseData<Volunteer> getInformation(Volunteer volunteerUser);

    ResponseData<VolunteerInformation> bindInformation(@NotNull(message = "name不能为空") String name, @NotNull(message = "IDCard不能为空") @Length(min = 18, max = 18, message = "IDCard长度必须是18") String idCard, Volunteer volunteerUser);

    ResponseData<Object> updateInformation(VolunteerInformation volunteerInformation, Volunteer volunteerUser);

    ResponseData<Object> unbindInformation(@NotNull(message = "code不能为空") String code, Volunteer volunteerUser);


    ResponseData<Object> getUnbindCode(Volunteer volunteerUser);

    /**
     * 查询所有志愿者
     */
    ResponseData<List<VolunteerInformation>> getAllVolunteer(VolunteerInformation volunteerInformation);

    /**
     * 通过id查询志愿者
     *
     * @return
     */
    ResponseData<VolunteerInformation> getVolunteerById(int informationId);
}
